# Base image for beat
FROM        docker.repo:5000/ppc64le/centos_base
MAINTAINER  Andy Zhang <zch@cn.ibm.com>
ENV         container=docker

# Install etcd
ARG         FILESERVER=http://172.16.0.164:8080/base_image
ARG         INST_DIR=/var/setup
RUN         mkdir $INST_DIR
WORKDIR     $INST_DIR
ADD         $FILESERVER/filebeat.tgz filebeat.tgz
RUN         tar -xzvf filebeat.tgz -C /usr/sbin/ && chmod -v a+x /usr/sbin/filebeat
VOLUME      /data/logs/
VOLUME      /var/log/
WORKDIR     /data/logs
RUN         rm -fr $INST_DIR
ENV         LS_HOST 172.16.0.206
ENV         LS_PORT 5044
RUN         mkdir /opt/at9.0/ && ln -sf /usr/lib64 /opt/at9.0/lib64
COPY        entrypoint.sh /
COPY        filebeat.yml /
ENTRYPOINT  ["/entrypoint.sh"]
LABEL        version="{{ image_version }}"
